//
//  LeftViewController.m
//  Flava
//
//  Created by Ug-Code on 13-8-12.
//  Copyright (c) 2013年 UgCode. All rights reserved.
//

#import "LeftViewController.h"
#import "LeftTableCellModel.h"

@interface LeftViewController ()

@end

@implementation LeftViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	//-- 创建预览窗
	_billboardView = [[BillboardView alloc] init];
	[self.view addSubview:_billboardView];
	_billboardView.userName = @"吾尔开希";
	_billboardView.userBirthday = @"1989-12-27";
	//-- 创建并配置TableView
	_tableViewController = [[LeftTableViewController alloc] init];
	_tableView = _tableViewController.tableView;
	_leftTableCellModels = [[NSMutableArray alloc] init];
	[self createTableCellModels];
	_tableViewController.tableCellModels = _leftTableCellModels;
	[self.view addSubview:_tableView];
	//-- 创建底部工具栏
	_toolBarView = [[ToolBarView alloc] init];
	[self.view addSubview:_toolBarView];
}

/** 创建tableView的数据模型 */
- (void)createTableCellModels
{
	LeftTableCellModel *model1 = [[LeftTableCellModel alloc] init];
	model1.titleText = @"最近更改页面";
	model1.cellKey = kCommonCell;
	[_leftTableCellModels addObject:model1];
	
	LeftTableCellModel *model2 = [[LeftTableCellModel alloc] init];
	model2.titleText = @"共享页面";
	model2.cellKey = kCommonCell;
	[_leftTableCellModels addObject:model2];
	
	LeftTableCellModel *model3 = [[LeftTableCellModel alloc] init];
	model3.titleText = @"按类型排序";
	model3.cellKey = KAttachedCell;
	[_leftTableCellModels addObject:model3];
	
	LeftTableCellModel *model4 = [[LeftTableCellModel alloc] init];
	model4.titleText = @"按标签排序";
	model4.cellKey = kEmoticonCell;
	[_leftTableCellModels addObject:model4];
	
	LeftTableCellModel *lastModel = [[LeftTableCellModel alloc] init];
	lastModel.titleText = @"©2013 Flava™";
	lastModel.cellKey = kLastCell;
	[_leftTableCellModels addObject:lastModel];
}
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
